<?php
session_start();
require_once '../confirmarAdmin.php';
require_once '../database.php';
$db = new DBAdminConnection();
$dir = $_SERVER['DOCUMENT_ROOT'];
if($db->exportarHistorico($dir)){
    header("Location: http://localhost/Matematrix/admin/lista.php?type=epocas&export=true");
} else {
    header("Location: http://localhost/Matematrix/admin/lista.php?type=epocas&export=false");
}
?>
